package com.clps.rulesregulations.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;
import java.util.List;

/**
 * 规章制度
 *
 * @author zhangchao
 * @date 2018-10-08
 */
@Document(indexName = "rulesregulations", type = "rule")
@Data
public class Rule {
    @org.springframework.data.annotation.Id
    @Id
    @GeneratedValue
    private Long id;
    @Column(nullable = false)
    private Integer ruleMenuId;
    @Column(nullable = false)
    private Integer companyId;
    private Integer catalogId;
    private String content;
    private Long version;
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    private Integer status;
    private String title;
    private String url;
    private Integer parentId;
    private String operator;
    //上传前的文件名字
    private String oldFilename;
    //上传后的文件名字
    private String newFilename;
    //回溯绑定的id
    private Long ruleId;
    private String fullPath;
    private Date startTime;
    private String startTimeShow;
    private Date endTime;
    private String endTimeShow;
    //参加会议的人
    private String attendUser;
    private List<User> attendusersList;
}

